package com.ryan.route.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ryan.route.entity.TravelRoute;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ryan.route.entity.frontvo.RouteDetailVo;
import com.ryan.route.entity.frontvo.SearchRouteVo;
import com.ryan.utils.vo.OrderRoute;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 旅游路线 服务类
 * </p>
 *
 * @author ryan
 * @since 2020-07-24
 */
public interface TravelRouteService extends IService<TravelRoute> {

    /**
     * 添加路线基本信息
     * @param route
     * @return
     */
    String saveRouteInfo(TravelRoute route);

    Map<String, Object> queryPage(long pageIndex, long pageSize, String title);

    /**
     * 获取前8条热门路线
     * @return
     */
    List<TravelRoute> getIndexRoute();

    /**
     * 前台页面条件查询
     * @param pageIndex
     * @param pageSize
     * @param searchRouteVo
     * @return
     */
    Map<String, Object> SearchRouteByVo(long pageIndex, long pageSize, SearchRouteVo searchRouteVo);

    RouteDetailVo getRouteDetailById(String routeId);


    void updateBuyCount(OrderRoute orderRoute);
}
